package net.dopan.pigframe.user.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.*;

import java.io.Serializable;
import java.util.Date;


/**
 * @author wufeihong
 * 用户表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("user")
public class User extends Model<User> {

  private static final long serialVersionUID = 1L;
  /**
   * 用户Id
   */
  @TableId(value = "user_id", type = IdType.AUTO)
  private long userId;
  @TableField("user_name")
  private String userName;
  private String password;
  private String phone;
  /**
   * 头像地址
   */
  private String avater;
  @TableField("create_time")
  private Date createTime;
  @TableField("update_time")
  private Date updateTime;
  /**
   * 个性签名
   */
  private String signature;
  /**
   * 用户身份验证 0未通过 1通过
   */
  @TableField("identity_verification")
  private int identityVerification;

  @Override
  protected Serializable pkVal() {
    return this.userId;
  }
}
